//
//  HOUIMgr.h
//  WeiDu_1_0
//
//  Created by foguo-mac-1 on 01/07/16.
//  Copyright (c) 2016 WeiDu Energy Tech. All rights reserved.
//

#import "HOBaseObject.h"
#import "HOBaseController.h"
#import "HOHTTPMgrDelegate.h"
#import "HOUICallbackDelegate.h"
#import "HOViewControllerDelegate.h"
#import "HOControllerDelegate.h"
#import "HOHttpMgr.h"
#import "HOUserInfoEntity.h"
#import "HOCaiyunUser.h"


@interface HOUIMgr : NSObject<HOUICallbackDelegate>
{
    HOHttpMgr                                   *httpMgr;
    NSMutableDictionary                         *controlerListenerDic;
    int                                         _notificationCount;
    int                                         _messageCount;
	NSMutableDictionary							*userInfoDic;
}
@property(nonatomic, retain)UIViewController *currentScreen;
@property(nonatomic, retain)UIViewController *currentViewController;

- (void)checkVersion;

- (NSString *)getToken;
- (int)getUserId;
- (BOOL)hasUnreadMsg;
+ (HOUIMgr *)sharedInstance;
#pragma mark --
#pragma mark for request
- (void)sendRequest:(HOBaseRequestEntity *)request;
- (void)cancel:(HOBaseRequestEntity *)request;

- (void)sendCommand:(NSString *)action data:(id)data;
- (void)sendCommand:(NSString *)action data:(id)data toModules:(NSArray *)moduleLiseners;

- (void)checkToken;
#pragma mark - -- push notification
- (void)test;

- (void)didReceiveRemoteNotification:(NSDictionary *)userInfo;
- (void)addMessageCount;
#pragma mark -- for handle app level --
- (void)logout;
- (void)didLogin;
//- (void)clearCache;
- (void)getNewMessage;

- (void)requestUserInfoWithUserId:(int)userId;
#pragma mark -- read Message From DB --
//- (void)didReadNewMessageFromDB;
- (void)removeObserverFromListener:(UIViewController *)viewController;


- (HOBaseController *)getController:(HO_MODULE_TYPE)moduleType;
- (UIViewController *)getFirstViewController;
- (void)checkNotification;
- (void)didGetJPushRegistrationID:(NSString *)jid;
- (void)networkDidReceiveMessage:(NSNotification *)notification;
- (void)saveToken:(NSString *)token;


@end
